USE [simulasyon]
GO

/****** Object:  View [dbo].[Rapor_Tumu]    Script Date: 04/24/2011 18:47:29 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE VIEW [dbo].[Rapor_Tumu]
AS
SELECT     TOP (100) PERCENT dbo.Calisma.Id AS CalismaId, dbo.Calisma.UrunAgaciTipi, dbo.Calisma.SiralamaKurali, dbo.Calisma.IsEmriAraligi, dbo.Calisma.KDegeri, 
                      dbo.Calisma.CalismaNo, dbo.Rapor_ToplamSiparisAdedi.SiparisAdedi, dbo.Rapor_BitenSiparisAdediTumu.BitenAdet AS BitenSiparisAdetTumu, 
                      dbo.Rapor_ErkenTeslimAdetSimSonTarih.ErkenTeslimSiparisAdet AS ErkenTeslimSiparisAdetTumu, 
                      dbo.Rapor_ErkenBitisAdetCizSim.ErkenBitenSiparisAdet AS ErkenBitenSiparisAdetTumu, dbo.Rapor_GecBitisAdetCizSim.GecBitenSiparisAdet, 
                      dbo.Rapor_GecTeslimAdetSimSonTarih.GecTeslimSiparisAdet, dbo.Rapor_ErkenBitisOrtalamaDakikaCizSim.ErkenBitisOrtalamaDakikaCizSim, 
                      dbo.Rapor_ErkenTeslimOrtalamaDakikaSimSonTarih.ErkenTeslimOrtalamaDakikaSimSontarih, 
                      dbo.Rapor_GecBitisOrtalamaDakikaCizSim.GecBitisOrtalamaDakikaCizSim, 
                      dbo.Rapor_GecTeslimOrtalamaDakikaSimSonTarih.GecTeslimOrtalamaDakikaSimSontarih, dbo.Rapor_OrtalamaKuyruk.OrtalamaWIPDakika, 
                      dbo.Rapor_OrtalamaKuyruk.OrtalamaKuyrukUzunlukDakika, dbo.Rapor_OrtalamaKuyruk.OrtalamaKuyrukAdedi, 
                      dbo.Rapor_FiltreliSiparisAdet.SiparisAdedi AS SiparisAdediFiltreli, dbo.Rapor_BitenSiparisAdediFiltreli.BitenAdet AS BitenSiparisAdetFiltreli, 
                      dbo.Rapor_ErkenBitisAdetCizSimFiltreli.ErkenBitenSiparisAdetFiltreli, dbo.Rapor_ErkenBitisOrtalamaDakikaCizSimFiltreli.ErkenBitisOrtalamaDakikaCizSimFiltreli, 
                      dbo.Rapor_ErkenTeslimAdetSimSonTarihFiltreli.ErkenTeslimSiparisAdetFiltreli, 
                      dbo.Rapor_ErkenTeslimOrtalamaDakikaSimSontarihFiltreli.ErkenTeslimOrtalamaDakikaSimSontarihFiltreli, 
                      dbo.Rapor_GecBitisAdetCizSimFiltreli.GecBitenSiparisAdetFiltreli, dbo.Rapor_GecBitisOrtalamaDakikaCizSimFiltreli.GecBitisOrtalamaDakikaCizSimFiltreli, 
                      dbo.Rapor_GecTeslimAdetSimSonTarihFiltreli.GecTeslimSiparisAdetFiltreli, 
                      dbo.Rapor_GecTeslimOrtalamaDakikaSimSontarihFiltreli.GecTeslimOrtalamaDakikaSimSontarihFiltreli, 
                      dbo.Rapor_OrtalamaSiparisTedarikSaat.OrtalamaSiparisTedarikSaat, dbo.Rapor_OrtalamaAkisZamaniSaat.OrtalamaSiparisAkisSaat, 
                      dbo.Rapor_MakKulOraniImalat.MakineKulOrani AS MakineKulOraniImalat, dbo.Rapor_MakKulOraniMontaj.MakineKulOrani AS MakineKulOraniMontaj, 
                      dbo.Rapor_MakKulOrani.MakineKulOrani, dbo.Rapor_OrtalamaKuyrukFiltreli.OrtalamaWIPDakikaFiltreli, 
                      dbo.Rapor_OrtalamaKuyrukFiltreli.OrtalamaKuyrukUzunlukDakikaFiltreli, dbo.Rapor_OrtalamaKuyrukFiltreli.OrtalamaKuyrukAdediFiltreli
FROM         dbo.Calisma LEFT OUTER JOIN
                      dbo.Rapor_OrtalamaKuyrukFiltreli ON dbo.Calisma.Id = dbo.Rapor_OrtalamaKuyrukFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_OrtalamaKuyruk ON dbo.Calisma.Id = dbo.Rapor_OrtalamaKuyruk.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_BitenSiparisAdediFiltreli ON dbo.Calisma.Id = dbo.Rapor_BitenSiparisAdediFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_MakKulOraniMontaj ON dbo.Calisma.Id = dbo.Rapor_MakKulOraniMontaj.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_MakKulOraniImalat ON dbo.Calisma.Id = dbo.Rapor_MakKulOraniImalat.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_MakKulOrani ON dbo.Calisma.Id = dbo.Rapor_MakKulOrani.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_OrtalamaAkisZamaniSaat ON dbo.Calisma.Id = dbo.Rapor_OrtalamaAkisZamaniSaat.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_OrtalamaSiparisTedarikSaat ON dbo.Calisma.Id = dbo.Rapor_OrtalamaSiparisTedarikSaat.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ErkenBitisOrtalamaDakikaCizSim ON dbo.Calisma.Id = dbo.Rapor_ErkenBitisOrtalamaDakikaCizSim.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ToplamSiparisAdedi ON dbo.Calisma.Id = dbo.Rapor_ToplamSiparisAdedi.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_GecTeslimOrtalamaDakikaSimSontarihFiltreli ON dbo.Calisma.Id = dbo.Rapor_GecTeslimOrtalamaDakikaSimSontarihFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_GecTeslimOrtalamaDakikaSimSonTarih ON dbo.Calisma.Id = dbo.Rapor_GecTeslimOrtalamaDakikaSimSonTarih.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_GecBitisOrtalamaDakikaCizSimFiltreli ON dbo.Calisma.Id = dbo.Rapor_GecBitisOrtalamaDakikaCizSimFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_GecBitisOrtalamaDakikaCizSim ON dbo.Calisma.Id = dbo.Rapor_GecBitisOrtalamaDakikaCizSim.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ErkenTeslimOrtalamaDakikaSimSontarihFiltreli ON 
                      dbo.Calisma.Id = dbo.Rapor_ErkenTeslimOrtalamaDakikaSimSontarihFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ErkenTeslimOrtalamaDakikaSimSonTarih ON dbo.Calisma.Id = dbo.Rapor_ErkenTeslimOrtalamaDakikaSimSonTarih.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ErkenBitisOrtalamaDakikaCizSimFiltreli ON dbo.Calisma.Id = dbo.Rapor_ErkenBitisOrtalamaDakikaCizSimFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_GecTeslimAdetSimSonTarih ON dbo.Calisma.Id = dbo.Rapor_GecTeslimAdetSimSonTarih.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_GecTeslimAdetSimSonTarihFiltreli ON dbo.Calisma.Id = dbo.Rapor_GecTeslimAdetSimSonTarihFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_GecBitisAdetCizSimFiltreli ON dbo.Calisma.Id = dbo.Rapor_GecBitisAdetCizSimFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_GecBitisAdetCizSim ON dbo.Calisma.Id = dbo.Rapor_GecBitisAdetCizSim.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ErkenTeslimAdetSimSonTarihFiltreli ON dbo.Calisma.Id = dbo.Rapor_ErkenTeslimAdetSimSonTarihFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ErkenBitisAdetCizSimFiltreli ON dbo.Calisma.Id = dbo.Rapor_ErkenBitisAdetCizSimFiltreli.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ErkenTeslimAdetSimSonTarih ON dbo.Calisma.Id = dbo.Rapor_ErkenTeslimAdetSimSonTarih.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_ErkenBitisAdetCizSim ON dbo.Calisma.Id = dbo.Rapor_ErkenBitisAdetCizSim.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_BitenSiparisAdediTumu ON dbo.Calisma.Id = dbo.Rapor_BitenSiparisAdediTumu.CalismaId LEFT OUTER JOIN
                      dbo.Rapor_FiltreliSiparisAdet ON dbo.Calisma.Id = dbo.Rapor_FiltreliSiparisAdet.CalismaId
ORDER BY CalismaId

GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[34] 4[44] 2[12] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = -192
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Calisma"
            Begin Extent = 
               Top = 1
               Left = 13
               Bottom = 164
               Right = 164
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_OrtalamaKuyrukFiltreli"
            Begin Extent = 
               Top = 188
               Left = 241
               Bottom = 296
               Right = 494
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_OrtalamaKuyruk"
            Begin Extent = 
               Top = 244
               Left = 119
               Bottom = 352
               Right = 344
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_BitenSiparisAdediFiltreli"
            Begin Extent = 
               Top = 268
               Left = 615
               Bottom = 346
               Right = 766
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_MakKulOraniMontaj"
            Begin Extent = 
               Top = 219
               Left = 191
               Bottom = 297
               Right = 344
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_MakKulOraniImalat"
            Begin Extent = 
               Top = 108
               Left = 258
               Bottom = 186
               Right = 411
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_MakKulOrani"
            Begin Extent = 
               Top = 0
               Left = 300
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Rapor_Tumu'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'               Bottom = 78
               Right = 453
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_OrtalamaSiparisTedarikSaat"
            Begin Extent = 
               Top = 55
               Left = 399
               Bottom = 133
               Right = 611
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ErkenBitisOrtalamaDakikaCizSim"
            Begin Extent = 
               Top = 191
               Left = 592
               Bottom = 269
               Right = 823
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ToplamSiparisAdedi"
            Begin Extent = 
               Top = 36
               Left = 543
               Bottom = 114
               Right = 694
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_GecTeslimOrtalamaDakikaSimSontarihFiltreli"
            Begin Extent = 
               Top = 321
               Left = 600
               Bottom = 399
               Right = 886
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_GecTeslimOrtalamaDakikaSimSonTarih"
            Begin Extent = 
               Top = 326
               Left = 667
               Bottom = 404
               Right = 925
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_GecBitisOrtalamaDakikaCizSimFiltreli"
            Begin Extent = 
               Top = 329
               Left = 644
               Bottom = 407
               Right = 894
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_GecBitisOrtalamaDakikaCizSim"
            Begin Extent = 
               Top = 269
               Left = 641
               Bottom = 347
               Right = 863
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ErkenTeslimOrtalamaDakikaSimSontarihFiltreli"
            Begin Extent = 
               Top = 205
               Left = 615
               Bottom = 283
               Right = 910
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ErkenTeslimOrtalamaDakikaSimSonTarih"
            Begin Extent = 
               Top = 225
               Left = 610
               Bottom = 303
               Right = 877
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ErkenBitisOrtalamaDakikaCizSimFiltreli"
            Begin Extent = 
               Top = 227
               Left = 691
               Bottom = 305
               Right = 950
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_GecTeslimAdetSimSonTarih"
            Begin Extent = 
               Top = 255
               Left = 603
               Bottom = 333
               Right = 784
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_GecTeslimAdetSimSonTarihFiltreli"
            Begin Extent = 
               Top = 307
               Left = 605
               Bottom = 385
               Right = 814
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_GecBitisAdetCizSimFiltreli"
            Be' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Rapor_Tumu'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane3', @value=N'gin Extent = 
               Top = 244
               Left = 602
               Bottom = 322
               Right = 806
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_GecBitisAdetCizSim"
            Begin Extent = 
               Top = 286
               Left = 651
               Bottom = 364
               Right = 827
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ErkenTeslimAdetSimSonTarihFiltreli"
            Begin Extent = 
               Top = 287
               Left = 590
               Bottom = 365
               Right = 808
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ErkenBitisAdetCizSimFiltreli"
            Begin Extent = 
               Top = 259
               Left = 636
               Bottom = 337
               Right = 849
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ErkenTeslimAdetSimSonTarih"
            Begin Extent = 
               Top = 95
               Left = 642
               Bottom = 173
               Right = 832
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_ErkenBitisAdetCizSim"
            Begin Extent = 
               Top = 140
               Left = 586
               Bottom = 218
               Right = 771
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_BitenSiparisAdediTumu"
            Begin Extent = 
               Top = 17
               Left = 747
               Bottom = 95
               Right = 898
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_FiltreliSiparisAdet"
            Begin Extent = 
               Top = 210
               Left = 613
               Bottom = 288
               Right = 764
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Rapor_OrtalamaAkisZamaniSaat"
            Begin Extent = 
               Top = 198
               Left = 988
               Bottom = 276
               Right = 1184
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 28
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 2010
         Width = 2385
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 3450
         Alias = 2265
         Table = 2805
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Rapor_Tumu'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=3 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Rapor_Tumu'
GO

